// Copyright 2023 Dolthub, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package output

import "testing"

func TestStartTransaction(t *testing.T) {
	tests := []QueryParses{
		Converts("START TRANSACTION"),
		Parses("START TRANSACTION ISOLATION LEVEL SERIALIZABLE"),
		Parses("START TRANSACTION ISOLATION LEVEL REPEATABLE READ"),
		Parses("START TRANSACTION ISOLATION LEVEL READ COMMITTED"),
		Parses("START TRANSACTION ISOLATION LEVEL READ UNCOMMITTED"),
		Converts("START TRANSACTION READ WRITE"),
		Converts("START TRANSACTION READ ONLY"),
		Parses("START TRANSACTION DEFERRABLE"),
		Parses("START TRANSACTION NOT DEFERRABLE"),
		Unimplemented("START TRANSACTION ISOLATION LEVEL SERIALIZABLE , ISOLATION LEVEL SERIALIZABLE"),
		Unimplemented("START TRANSACTION ISOLATION LEVEL REPEATABLE READ , ISOLATION LEVEL SERIALIZABLE"),
		Unimplemented("START TRANSACTION ISOLATION LEVEL READ COMMITTED , ISOLATION LEVEL SERIALIZABLE"),
		Unimplemented("START TRANSACTION ISOLATION LEVEL READ UNCOMMITTED , ISOLATION LEVEL SERIALIZABLE"),
		Parses("START TRANSACTION READ WRITE , ISOLATION LEVEL SERIALIZABLE"),
		Parses("START TRANSACTION READ ONLY , ISOLATION LEVEL SERIALIZABLE"),
		Parses("START TRANSACTION DEFERRABLE , ISOLATION LEVEL SERIALIZABLE"),
		Parses("START TRANSACTION NOT DEFERRABLE , ISOLATION LEVEL SERIALIZABLE"),
		Unimplemented("START TRANSACTION ISOLATION LEVEL SERIALIZABLE , ISOLATION LEVEL REPEATABLE READ"),
		Unimplemented("START TRANSACTION ISOLATION LEVEL REPEATABLE READ , ISOLATION LEVEL REPEATABLE READ"),
		Unimplemented("START TRANSACTION ISOLATION LEVEL READ COMMITTED , ISOLATION LEVEL REPEATABLE READ"),
		Unimplemented("START TRANSACTION ISOLATION LEVEL READ UNCOMMITTED , ISOLATION LEVEL REPEATABLE READ"),
		Parses("START TRANSACTION READ WRITE , ISOLATION LEVEL REPEATABLE READ"),
		Parses("START TRANSACTION READ ONLY , ISOLATION LEVEL REPEATABLE READ"),
		Parses("START TRANSACTION DEFERRABLE , ISOLATION LEVEL REPEATABLE READ"),
		Parses("START TRANSACTION NOT DEFERRABLE , ISOLATION LEVEL REPEATABLE READ"),
		Unimplemented("START TRANSACTION ISOLATION LEVEL SERIALIZABLE , ISOLATION LEVEL READ COMMITTED"),
		Unimplemented("START TRANSACTION ISOLATION LEVEL REPEATABLE READ , ISOLATION LEVEL READ COMMITTED"),
		Unimplemented("START TRANSACTION ISOLATION LEVEL READ COMMITTED , ISOLATION LEVEL READ COMMITTED"),
		Unimplemented("START TRANSACTION ISOLATION LEVEL READ UNCOMMITTED , ISOLATION LEVEL READ COMMITTED"),
		Parses("START TRANSACTION READ WRITE , ISOLATION LEVEL READ COMMITTED"),
		Parses("START TRANSACTION READ ONLY , ISOLATION LEVEL READ COMMITTED"),
		Parses("START TRANSACTION DEFERRABLE , ISOLATION LEVEL READ COMMITTED"),
		Parses("START TRANSACTION NOT DEFERRABLE , ISOLATION LEVEL READ COMMITTED"),
		Unimplemented("START TRANSACTION ISOLATION LEVEL SERIALIZABLE , ISOLATION LEVEL READ UNCOMMITTED"),
		Unimplemented("START TRANSACTION ISOLATION LEVEL REPEATABLE READ , ISOLATION LEVEL READ UNCOMMITTED"),
		Unimplemented("START TRANSACTION ISOLATION LEVEL READ COMMITTED , ISOLATION LEVEL READ UNCOMMITTED"),
		Unimplemented("START TRANSACTION ISOLATION LEVEL READ UNCOMMITTED , ISOLATION LEVEL READ UNCOMMITTED"),
		Parses("START TRANSACTION READ WRITE , ISOLATION LEVEL READ UNCOMMITTED"),
		Parses("START TRANSACTION READ ONLY , ISOLATION LEVEL READ UNCOMMITTED"),
		Parses("START TRANSACTION DEFERRABLE , ISOLATION LEVEL READ UNCOMMITTED"),
		Parses("START TRANSACTION NOT DEFERRABLE , ISOLATION LEVEL READ UNCOMMITTED"),
		Parses("START TRANSACTION ISOLATION LEVEL SERIALIZABLE , READ WRITE"),
		Parses("START TRANSACTION ISOLATION LEVEL REPEATABLE READ , READ WRITE"),
		Parses("START TRANSACTION ISOLATION LEVEL READ COMMITTED , READ WRITE"),
		Parses("START TRANSACTION ISOLATION LEVEL READ UNCOMMITTED , READ WRITE"),
		Unimplemented("START TRANSACTION READ WRITE , READ WRITE"),
		Unimplemented("START TRANSACTION READ ONLY , READ WRITE"),
		Parses("START TRANSACTION DEFERRABLE , READ WRITE"),
		Parses("START TRANSACTION NOT DEFERRABLE , READ WRITE"),
		Parses("START TRANSACTION ISOLATION LEVEL SERIALIZABLE , READ ONLY"),
		Parses("START TRANSACTION ISOLATION LEVEL REPEATABLE READ , READ ONLY"),
		Parses("START TRANSACTION ISOLATION LEVEL READ COMMITTED , READ ONLY"),
		Parses("START TRANSACTION ISOLATION LEVEL READ UNCOMMITTED , READ ONLY"),
		Unimplemented("START TRANSACTION READ WRITE , READ ONLY"),
		Unimplemented("START TRANSACTION READ ONLY , READ ONLY"),
		Parses("START TRANSACTION DEFERRABLE , READ ONLY"),
		Parses("START TRANSACTION NOT DEFERRABLE , READ ONLY"),
		Parses("START TRANSACTION ISOLATION LEVEL SERIALIZABLE , DEFERRABLE"),
		Parses("START TRANSACTION ISOLATION LEVEL REPEATABLE READ , DEFERRABLE"),
		Parses("START TRANSACTION ISOLATION LEVEL READ COMMITTED , DEFERRABLE"),
		Parses("START TRANSACTION ISOLATION LEVEL READ UNCOMMITTED , DEFERRABLE"),
		Parses("START TRANSACTION READ WRITE , DEFERRABLE"),
		Parses("START TRANSACTION READ ONLY , DEFERRABLE"),
		Unimplemented("START TRANSACTION DEFERRABLE , DEFERRABLE"),
		Unimplemented("START TRANSACTION NOT DEFERRABLE , DEFERRABLE"),
		Parses("START TRANSACTION ISOLATION LEVEL SERIALIZABLE , NOT DEFERRABLE"),
		Parses("START TRANSACTION ISOLATION LEVEL REPEATABLE READ , NOT DEFERRABLE"),
		Parses("START TRANSACTION ISOLATION LEVEL READ COMMITTED , NOT DEFERRABLE"),
		Parses("START TRANSACTION ISOLATION LEVEL READ UNCOMMITTED , NOT DEFERRABLE"),
		Parses("START TRANSACTION READ WRITE , NOT DEFERRABLE"),
		Parses("START TRANSACTION READ ONLY , NOT DEFERRABLE"),
		Unimplemented("START TRANSACTION DEFERRABLE , NOT DEFERRABLE"),
		Unimplemented("START TRANSACTION NOT DEFERRABLE , NOT DEFERRABLE"),
	}
	RunTests(t, tests)
}
